﻿namespace XServer.Utility.Pools
{
    public class GeneralTask : ITask
    {
        private Delegate _task;
        private object[] _args;

        public GeneralTask(Delegate task, params object[] args)
        {
            _task = task;
            _args = args;
        }

        public bool Execute()
        {
            _task.DynamicInvoke(_args);
            return true;
        }
    }
}
